
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>选择系列</title>
<meta name="viewport" content="initial-scale=1, maximum-scale=1">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">

<link rel="stylesheet" href="//g.alicdn.com/msui/sm/0.6.2/css/sm.min.css">
<link rel="stylesheet" href="//g.alicdn.com/msui/sm/0.6.2/css/sm-extend.min.css">
<script type="text/javascript" src="/js/jquery-3.1.0.js"></script>
<script type="text/javascript" src="/js/base.js"></script>
<script type="text/javascript">
    EventUtil.addHandler(window, "load", function(){
        var info = {
            c_brand :localStorage["brand"],
        }
//         $.ajax({
//             url: "http://localhost:8080/computer/seriesSelect.do",
//             method: "POST",
//             data: info,
// //                        dataType表示服务器端返回的数据格式，在这里也就是result变量的数据格式
//             dataType: 'json',
//             success: function (result) {
//                 var ul = getEl("ul");

            AjaxIO.post("/user/login",info,
                        function (result) {
                          
                var ul = getEl("ul");
                for(var i = 0; i<result.length;i++) {
                    var li = document.createElement("li");
                    var a = document.createElement("a");
                    a.setAttribute("href", "#");
                    a.className = "item-link item-content";
                    var div1 = document.createElement("div");
                    div1.className = "item-media";
                    var img = document.createElement("img");
                    img.setAttribute("src", "/"+result[i].c_filesrc);
                    img.setAttribute("style", "width: 2.2rem;");
                    var div2 = document.createElement("div");
                    div2.className = "item-inner";
                    var div3 = document.createElement("div");
                    div3.className = "item-title-row";
                    var div4 = document.createElement("div");
                    div4.className = "item-title";
                    div4.innerHTML = result[i].c_series;

                    div3.appendChild(div4);
                    div2.appendChild(div3);
                    div1.appendChild(img);
                    a.appendChild(div1);
                    a.appendChild(div2);
                    li.appendChild(a);
                    ul.appendChild(li);
                }
            },function(result)
            {
                alert("no match")
            }

                $(".item-link").click(function () {
                    var c_series = $(this).find("div.item-title")[0].innerText;
                    c_series = localStorage.setItem("series",c_series);
                    window.location.href="/skip/selectType.do";
                })
            }
        })
    });
    
</script>
</head>

<body>
<div class="page-group">
    <div class="page page-current">
         <header class="bar bar-nav">
    <a class="button button-link button-nav pull-left" href="/demos/card" data-transition='slide-out'>
      <span class="icon icon-left"></span>
      返回
    </a>
    <h1 class="title">选择系列</h1>
  </header>
        <div class="content">
            <div class="content-block-title">品牌系列列表</div>
            <div class="list-block media-list inset">
                <ul id="ul">
                </ul>
            </div>
        </div>

    </div>
</div>
<script type='text/javascript' src='//g.alicdn.com/sj/lib/zepto/zepto.min.js' charset='utf-8'></script>
<script type='text/javascript' src='//g.alicdn.com/msui/sm/0.6.2/js/sm.min.js' charset='utf-8'></script>
<script type='text/javascript' src='//g.alicdn.com/msui/sm/0.6.2/js/sm-extend.min.js' charset='utf-8'></script>
</body>
</html>

